import { ApiFetch, type ErrorMessageMode } from "../http";

export class ApiLogin extends ApiFetch {
  async login(params: { username: string; password: string }, mode: ErrorMessageMode = "message") {
    return await super.post<string>("/login", params, mode);
  }

  async logout() {
    return await super.get<void>("/logout", undefined, "modal");
  }
}
